home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1993 August
/
1993-08.d64
/
32 demo
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
2KB
|
57 lines
100 rem 32 sprites demo
110 rem
120 print"[147]":poke53281,0:poke53280,0
125 ifa=0then a=1:load"32 demo.ml",8,1
127 ifa=1then a=2:load"32",8,1
130 rem initialize 32 sprite registers
135 dim c(10)
140 y=52992:x=53024:hx=53056:c=53120
150 p=53216:pr=53275
160 forj=0to31:pokey+j,0:pokex+j,0:pokehx+j,0:pokec+j,0:pokep+j,14:next
170 forj=0to63:poke704+j,0:poke832+j,0:poke896+j,0:next
180 forj=3to59:poke832+j,255:next
190 pokepr,255:sys 50080:sys 49152:poke53269,255
200 dt$=""
210 printleft$(dt$,8);tab(15)"[159]32 [211][208][210][201][212][197][211]"
220 printtab(9)"[154][195]ustom 32-[211]prite [210]aster"
230 printtab(15)"[195]ontroller"
240 print:printtab(9)"[217]ou can display up to 32"
250 printtab(6)"sprites on the screen at any"
260 printtab(7)"time. [197]ach sprite can move"
270 printtab(9)"anywhere on the screen."
280 forcl=1to10:readc(cl):next:data 8,2,9,10,7,1,7,10,9,2
290 forj=31to0step-1:pokep+j,13:forcl=1to10:pokec+j,c(cl):next:next
300 gosub 1010
310 gosub 1000
320 printleft$(dt$,12);tab(7)"[217]ou have full control over"
330 printtab(7)"every sprite option except"
340 printtab(13)"[217]-expansion."
350 forj=0to31:pokec+j,int(rnd(1)*15)+1:next:gosub1020
360 forj=0to31:pokec+j,2:next:gosub1020
370 forj=0to63:poke832+j,0:next
375 forj=0to31:a=int(rnd(1)*3)+1:ifa=1thenpp=13
377 ifa=2thenpp=14
378 ifa=3thenpp=11
379 pokep+j,pp:next:cc=85
380 forj=3to59:poke704+j,int(rnd(1)*256):poke896+j,cc:cc=255-cc:poke832+j,255
385 next
390 poke53285,7:poke53286,10
400 gosub1020:poke53276,255:gosub1020:gosub1020:poke53276,0:gosub1020
410 forj=0to31:pokep+j,13:next
420 gosub1020:poke53277,255:gosub1020:poke53277,0
440 printleft$(dt$,12);tab(5)"[205]ove sprite #1 with joystick"
450 printtab(2)"in port 2. [208]ress + and - to change"
460 printtab(3)"sprite number. [208]ress [195] to change"
470 printtab(8)"color. [208]ress [209] to quit."
480 sys 50272:poke254,0:sp=1
490 poke254,sp-1:printleft$(dt$,12);tab(18);mid$(str$(sp),2);" "
500 geta$:ifa$="+"andsp<32thensp=sp+1:goto 490
510 ifa$="-"andsp>1thensp=sp-1:goto 490
520 ifa$="c"thenpokec+sp-1,(peek(c+sp-1)+1)and15
530 ifa$<>"q"then500
540 poke828,0:sys 828
999 end
1000 forj=11to24:poke781,j:sys 59903:next:return
1010 forj=1to1000:next:return
1020 forj=1to500:next:return